package day07;

import java.util.Random;
import java.util.Scanner;

public class Gussing2 {
    public static void main(String[] args) {
    guss();
    }
    public static void guss(){
        Scanner scanner = new Scanner(System.in);
        Random random = new Random();
        int sum = random.nextInt(1000);
//        int num = (int) (Math.random()*1000+1);
        System.out.println("游戏开始");
        while (true){
            int s = scanner.nextInt();
            if (s>sum){
                System.out.println("猜大了");
            }else if (s<sum){
                System.out.println("猜小了");
            }else {
                System.out.println("恭喜你猜对了");
                break;
            }
        }
    }
}
